package tt.dz.biz.dao.log;

import org.springframework.stereotype.Repository;
import tt.dz.biz.dao.BaseDAO;
import tt.dz.common.DZStringUtil;
import tt.dz.vo.LogVO;

@Repository("logDAO")
public class LogDAOImp
  extends BaseDAO
{
  private static final String SEQNAME = "log_seq";
  private static final String INSERT_LOG = "insert into ms_log(log_id,biz_type,biz_code,biz_name,start_time,end_time,param_in,param_out,biz_desc)  values(:logId,:bizType,:bizCode,:bizName,:startTime,:endTime,:paramIn,:paramOut,:bizDesc )";
  
  public void log(LogVO logVo)
    throws Exception
  {
    logVo.setLogId(DZStringUtil.getFixedLengthString(10, String.valueOf(querySequence("log_seq"))));
    save("insert into ms_log(log_id,biz_type,biz_code,biz_name,start_time,end_time,param_in,param_out,biz_desc)  values(:logId,:bizType,:bizCode,:bizName,:startTime,:endTime,:paramIn,:paramOut,:bizDesc )", logVo);
  }
}
